Skip to content

Conversation

@maybeec
Copy link
Member

@maybeec maybeec commented Nov 4, 2025

Fixes: #1596

Description

This PR adds support for comma-separated workspace values in repository configuration, allowing repositories to be cloned into multiple workspaces during project setup.
Currently, you can workaround this by simply having duplicate repositories configurations with different names pointing to different workspaces. This proposed feature is for convenience only.

Changes

  • Modified RepositoryConfig to use Set<String> for workspaces instead of single String
  • Added getWorkspaces() method in RepositoryProperties to parse comma-separated values
  • Refactored RepositoryCommandlet to clone repositories into multiple workspaces
  • Updated workspace status files to include workspace name for per-workspace tracking
  • Added 3 comprehensive test cases covering multiple scenarios
  • Updated documentation in repository.adoc
  • Updated CHANGELOG.adoc

Checklist

  • mvn clean test passes locally
  • Followed coding conventions from coding-conventions.adoc
  • Added to CHANGELOG.adoc
  • Code is properly tested with unit tests
  • Documentation updated

Testing

All 9 tests in RepositoryCommandletTest pass successfully, including:

  • Multiple workspaces with comma separation
  • Handling of whitespace around commas
  • Empty workspace defaulting to "main"

Related Issues

This implements a feature request to support cloning repositories into multiple workspaces via comma-separated configuration values.

@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Nov 4, 2025
@maybeec maybeec added configuration should be configurable or configuration change repository Commandlet to clone, build or import git repositories labels Nov 4, 2025
@coveralls
Copy link
Collaborator

coveralls commented Nov 4, 2025

Pull Request Test Coverage Report for Build 19681245351

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 33 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 69.164%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/git/repository/RepositoryProperties.java 1 63.24%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 1 78.33%
com/devonfw/tools/ide/git/repository/RepositoryCommandlet.java 31 56.38%
Totals Coverage Status
Change from base Build 19679625723: 0.02%
Covered Lines: 9476
Relevant Lines: 13189

💛 - Coveralls

Updated changelog to reflect new features and bugfixes.
@jan-vcapgemini jan-vcapgemini moved this from 🆕 New to Team Review in IDEasy board Nov 6, 2025
@jan-vcapgemini jan-vcapgemini self-assigned this Nov 6, 2025
@maybeec maybeec requested review from hohwille and jan-vcapgemini and removed request for hohwille November 6, 2025 19:05
@hohwille
Copy link
Member

This PR adds support for comma-separated workspace values in repository configuration, allowing repositories to be cloned into multiple workspaces during project setup.

Can you give a rationale for your use-case?
Wouldn't I clone different branches into different workspaces?
Otherwise I get the exact same cloned copy multiple times.
Why would I want to have this?

@maybeec
Copy link
Member Author

maybeec commented Nov 10, 2025

In my project there have been multiple test frameworks implemented. One for BDD, one for Performance tetss, and so on. All of them share some libraries, which could also end up in the need to be adapted. Work is distributed such that the team is responsible for all of the frameworks and need to switch easily and fast development context. If now changes need to be done in dependent libraries, I always need to stash multiple repositories or commit to working branches before switching for a quickfix on jenkins or similar.
Thus, I am setting up multiple workspaces for each context with a (yes) potentially duplicated clone of dependent libraries to be fast and allow also multiple IDEs with multiple AI instances to work.

@maybeec
Copy link
Member Author

maybeec commented Nov 10, 2025

Same holds for a cross-cutting documentation to be especially reused for Copilot execution, which needs to be present in all workspaces to properly refer to the docs and let Copilot draw the right conclusions and steps.

At the moment I am using the described workaround, but it's simply nasty, so I wanted to propose this improvements as said simply for convenience.

@hohwille
Copy link
Member

hohwille commented Nov 11, 2025

If we want to support this feature, is redundant git cloning really the answer?
How about copying or linking the already cloned project to additional workspaces?
Maybe even git worktrees would make much more sense here?

The latter (worktrees) is also a great git-feature that many developers could benefit from but are not even aware it exists. Maybe we can also help to "spread the word" this way.

@maybeec
Copy link
Member Author

maybeec commented Nov 11, 2025

Agree. There are lot of such solutions.
Nonetheless, I am focusing on KISS. This supports me in very big teams and also with AI. The easier to work with, the easier it is to guide people and AI. Thus, a hard copy is currently the most valuable.
As said, the feature is not deciding about good and bad. It's basically convenience. I have set it up with the workaround mentioned.

@jan-vcapgemini
Copy link
Contributor

I've created a new issue for this feature #1596, please adjust the changelog.

Co-authored-by: jan-vcapgemini <[email protected]>
@hohwille hohwille removed this from the release:2025.11.001 milestone Nov 18, 2025
@hohwille hohwille added this to the release:2025.12.001 milestone Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

configuration should be configurable or configuration change repository Commandlet to clone, build or import git repositories

Projects

Status: Team Review

Development

Successfully merging this pull request may close these issues.

Add support for comma-separated workspace values in repository configuration

4 participants